package com.hospital.phyexam.dao;

import com.hospital.phyexam.entity.Department;
import com.hospital.phyexam.entity.DepartmentExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface DepartmentMapper {
    /**
     * 通过部门id查找部门名称
     *
     * @param id 部门id
     * @return 部门名称
     */
    String findDeptNameById(Integer id);

    /**
     * 通过部门id查找部门信息
     *
     * @param id 部门id
     * @return 部门的对象
     */
    Department findDeptInfoById(Integer id);

    /**
     * 查询所有部门的信息
     *
     * @return
     */
    List<Department> findAllDeptInfo();

    long countByExample(DepartmentExample example);

    int deleteByExample(DepartmentExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Department record);

    int insertSelective(Department record);

    List<Department> selectByExample(DepartmentExample example);

    Department selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Department record, @Param("example") DepartmentExample example);

    int updateByExample(@Param("record") Department record, @Param("example") DepartmentExample example);

    int updateByPrimaryKeySelective(Department record);

    int updateByPrimaryKey(Department record);
}